# 安装软件依赖
./install_dependency.sh
# 配置ftp环境
./config_ftp_env.sh
# 拷贝模型
cp DQNModel.h5 /etc/DQNModel.h5
# 创建控制文件
## 创建同步控制脚本
echo "please enter syn server ip"
read syn_ip
echo "please enter syn server username"
read syn_user_name
echo "please enter vm net zone"
read net_zone
echo "please enter nat gateway"
read nat_gateway

upload_shell_name=upload_configs
fetch_shell_name=fetchConfig
ftp_controller_name=FtpController
change_ip_shell_name=change_ip

hpt_path="../MimicryHoneypot/"
pse_path="../PseudoHoneypot/"
src_path="../SourseCodes/"

#upload_configs.sh

echo "syn_server_ip=$syn_ip" > $hpt_path$upload_shell_name.sh
echo "syn_server_user=$syn_user_name" >> $hpt_path$upload_shell_name.sh
cat $hpt_path${upload_shell_name}Raw.sh >> $hpt_path$upload_shell_name.sh
rm $hpt_path${upload_shell_name}Raw.sh
chmod +x  $hpt_path$upload_shell_name.sh
# fetchConfig.sh

echo "syn_server_ip=$syn_ip" > $pse_path$fetch_shell_name.sh
echo "syn_server_user=$syn_user_name" >> $pse_path$fetch_shell_name.sh
cat $pse_path${fetch_shell_name}Raw.sh >> $pse_path$fetch_shell_name.sh
rm $pse_path${fetch_shell_name}Raw.sh
chmod +x $pse_path$fetch_shell_name.sh
#change_ip.sh

echo "gateway=$nat_gateway" > $src_path$change_ip_shell_name.sh
cat $src_path${change_ip_shell_name}Raw.sh >> $src_path$change_ip_shell_name.sh
rm $src_path${change_ip_shell_name}Raw.sh
chmod +x  $src_path$change_ip_shell_name.sh
# ftp controller py

echo "#coding=utf-8" > $src_path$ftp_controller_name.py
echo "net_zone=$net_zone" >> $src_path$ftp_controller_name.py
cat $src_path${ftp_controller_name}Raw.py >> $src_path$ftp_controller_name.py
chmod +x $src_path$ftp_controller_name.py

